Repository navigation
Phase 2a: Port argument parsing and CLI entry point to Rust - #30
Merged
Merged
Conversation
Mirror all Python flags from parse_args.py into a clap-based Rust CLI. The binary parses args strictly then delegates to `python -m fastled.app` as a subprocess, forwarding all flags verbatim so behaviour is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
crates/fastled-cli/src/main.rsfrom a hello-world stub into a full clap CLI that mirrors every flag defined insrc/fastled/parse_args.py[DIRECTORY], all boolean flags (--just-compile,--profile,--app,--install,--dry-run,--no-interactive,--no-https,--latest,--purge,--debug,--quick,--release), and value flags (--serve-dir,--init [EXAMPLE],--branch,--commit,--fastled-path) are all declared--debug,--quick,--release) useconflicts_with_allto enforce mutual exclusivity matching the Pythonadd_mutually_exclusive_groupVIRTUAL_ENV→python→python3) and execspython -m fastled.app <forwarded-args>, returning Python's exit code — zero behaviour changeCloses #18
Test plan
./_cargo build --workspace— compiles clean./_cargo test --workspace— 0 test failures./_cargo clippy --workspace --all-targets -- -D warnings— clean./_cargo fmt --all --check— clean./target/x86_64-pc-windows-msvc/debug/fastled.exe --help— shows all flags./target/x86_64-pc-windows-msvc/debug/fastled.exe --version— printsfastled 2.0.6bash lint— all checks passbash test(120/121) — 1 pre-existingtest_api.pyfailure due to no network in CI environment